home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
wais
/
ir
/
Imakefile
< prev
next >
Wrap
Makefile
|
1995-05-09
|
6KB
|
287 lines
# @(#) Imakefile 11.1 95/02/09
#
# This is a sample server, Z39.50 library, and a user interface stub
# The Z39.50 library was primariy written by Harry Morris and the search
# engine was primarily written by Brewster Kahle.
# -brewster 4/90
# S001 14-Mar-1995 kamalm@sco.com
# - adjusted CFLAGS for SCO 5.0 build
# - tweaked to only build target libraries (for Mosaic), not utilities
# - added logfile.c for necessary 'logfile' definition in "libs only" mode
#
# S000 18 Sep 1993 rr@sco.com
# placed under SCCS and turned into an Imakefile
#
# $Log: Makefile,v $
# Revision 1.8.1.1 1992/07/11 00:41:46 curtisg
# Added dependencies, moved things around
# (notably, use ../lib instead of ../bin for libraries.)
#
# Revision 1.8 92/05/10 14:42:26 jonathan
# Changed CLIENT_LOCAL_SRC ot ui-local.c. Added link to ui.c
#
# Revision 1.7 92/04/30 12:30:22 jonathan
# Changed CC = to use cc instead. It's the right thing to do...
#
# Revision 1.6 92/04/28 17:09:05 jonathan
# Added lock.[co] to lists.
#
# Revision 1.5 92/02/27 09:15:28 jonathan
# fixed compile line for ui-local.o
#
# Revision 1.4 92/02/24 10:06:59 jonathan
# Removed -DBOOL from CFLAGS
#
# Revision 1.3 92/02/13 13:02:44 jonathan
# Added CLIENT_LIB to default, and fixed rule.
#
# Revision 1.2 92/02/13 12:28:26 jonathan
# Removed object and boolean sources from definitions.
#
# Revision 1.1 92/02/13 11:55:08 jonathan
# Initial revision
#
#
# If a namespace resolver is not used (gethostbyname),
# set RESOLVER to nothing, otherwise -lresolv
# gcc vs cc: This library was written on a bunch of ANSI routines.
# the ones that did not exist in gcc or for non-ANSI cc are in ustubs.c
# for old BSD cc or System V, see cflags below
LIBDIR = ../lib
BINDIR = ../bin
SERVER_CMD = waisserver # wais server
SERVER1_CMD = waisserver1 # single task wais server
INDEX_CMD = waisindex # file indexer
PROTOCOL_LIB = $(LIBDIR)/libwais.a # protocol library
CLIENT_LIB = $(LIBDIR)/libclient.a # client library
INV_LIB = $(LIBDIR)/libinv.a # inverted file library
SIG_LIB = $(LIBDIR)/libsig.a # signature file library
LIBFTW = $(LIBDIR)/libftw.a # support library
SHELL_UI_SRC = ../ui/shell-ui.c
#
# Configure these for your system.
#
RM = /bin/rm -f
AR = ar
ARFLAGS = r
INSTALL = cp
# on SGIs, set this to true
RANLIB = true
# C Compiler. Use either cc or gcc. Comment this out in release to
# inherit from top level.
CC = cc
# Compiler & linker flags.
# Compiler debug flag. Use -g for debugging, -O for optimization.
# for antique bsd add -DBSD
# for System V add -DSYSV
# for XENIX add -M3e -Zi
# -DSECURE_SERVER for waisserver to setuid to uucp after startup.
CFLAGS = -b elf -O -I../ir -DSECURE_SERVER -DRELEVANCE_FEEDBACK -DUSG -DSYSV
# dealing with taking an intenet name and resolving it.
# set to -lresolv or nothing
#RESOLVER= #-lresolv
RESOLVER= -lsocket
#
# Files.
#
# List of source files for saber.
PROTOCOL_SRC = \
cutil.c \
futil.c \
ircfiles.c \
irfileio.c \
irfiles.c \
irtfiles.c \
panic.c \
sockets.c \
transprt.c \
ustubs.c \
wmessage.c \
wprot.c \
wutil.c \
zprot.c \
zutil.c \
ztype1.c \
docid.c \
list.c \
lock.c
IR_SRC = \
ir.c \
irretrvl.c \
stoplist.c \
irsearch.c \
trie.c
CLIENT_SRC = \
ui.c
CLIENT_LOCAL_SRC = \
ui-local.c
INV_SRC = $(SOURCES) \
sersrch.c \
irhash.c \
hash.c \
irinv.c
SIG_SRC = $(SOURCES) \
sigsrch.c \
sighash.c \
hash.c
INDEX_SRC= irbuild.c
SERVER_SRC= $(INV_SRC) \
server.c
# List of object files for saber and regular compilation.
# Should correspond to source files.
#
# S001 -- add logfile.o for "libs only" mode:
#
PROTOCOL_OBJ = \
logfile.o \
cutil.o \
futil.o \
ircfiles.o \
irfileio.o \
irfiles.o \
panic.o \
sockets.o \
transprt.o \
ustubs.o \
wmessage.o \
wprot.o \
wutil.o \
zprot.o \
zutil.o \
ztype1.o \
docid.o \
list.o \
lock.o
IR_OBJS = \
ir.o \
irretrvl.o \
irsearch.o \
irtfiles.o \
stoplist.o \
trie.o
CLIENT_OBJS = \
ui.o
CLIENT_LOCAL_OBJS = \
ui-local.o
INV_OBJ = $(IR_OBJS) \
$(CLIENT_LOCAL_OBJS) \
sersrch.o \
irhash.o \
hash.o \
irinv.o
SIG_OBJ = $(IR_OBJS) \
$(CLIENT_LOCAL_OBJS) \
sigsrch.o \
sighash.o \
hash.o
INDEX_OBJ = irbuild.o
SERVER_OBJ = server.o
SERVER1_OBJ = server-single.o
#
# Compilation.
#
# all:: $(PROTOCOL_LIB) \ # S001
# $(INV_LIB) \
# $(SIG_LIB) \
# $(CLIENT_LIB) \
# $(INDEX_CMD) \
# $(SERVER_CMD)
all:: $(PROTOCOL_LIB) $(INV_LIB)
# # S001
# install:: $(INDEX_CMD) $(SERVER_CMD)
# -rm -f $(BINDIR)/$(INDEX_CMD)
# $(INSTALL) $(INDEX_CMD) $(BINDIR)/$(INDEX_CMD)
# -rm -f $(BINDIR)/$(SERVER_CMD)
# $(INSTALL) $(SERVER_CMD) $(BINDIR)/$(SERVER_CMD)
install::
clean::
-rm -f $(INDEX_CMD) $(SERVER_CMD)
$(CLIENT_LOCAL_OBJS):: $(CLIENT_LOCAL_SRC)
$(CC) $(CFLAGS) -DLOCAL_SEARCH -c $(CLIENT_LOCAL_SRC)
$(PROTOCOL_LIB):: $(LIBDIR) $(PROTOCOL_OBJ)
$(AR) $(ARFLAGS) $@ $(PROTOCOL_OBJ)
$(RANLIB) $@
$(CLIENT_LIB):: $(LIBDIR) $(CLIENT_OBJS)
$(AR) $(ARFLAGS) $@ $(CLIENT_OBJS)
$(RANLIB) $@
$(INV_LIB):: $(LIBDIR) $(INV_OBJ)
$(AR) $(ARFLAGS) $@ $(INV_OBJ)
$(RANLIB) $@
$(SIG_LIB):: $(LIBDIR) $(SIG_OBJ)
$(AR) $(ARFLAGS) $@ $(SIG_OBJ)
$(RANLIB) $@
$(INDEX_CMD):: $(INDEX_OBJ) $(PROTOCOL_LIB) $(INV_LIB) $(LIBFTW)
$(RM) $@
$(CC) $(CFLAGS) -o $@ $(INDEX_OBJ) \
$(INV_LIB) $(PROTOCOL_LIB) $(LIBFTW) -lm $(RESOLVER);
$(SERVER_CMD):: $(SERVER_OBJ) $(PROTOCOL_LIB) $(INV_LIB) $(LIBFTW)
$(RM) $@
$(CC) $(CFLAGS) -o $@ $(SERVER_OBJ) \
$(INV_LIB) $(PROTOCOL_LIB) $(LIBFTW) -lm $(RESOLVER);
$(SERVER1_CMD):: $(SERVER1_OBJ) $(PROTOCOL_LIB) $(INV_LIB) $(LIBFTW)
$(RM) $@
$(CC) $(CFLAGS) -o $@ $(SERVER1_OBJ) \
$(INV_LIB) $(PROTOCOL_LIB) $(LIBFTW) -lm $(RESOLVER);
$(LIBDIR)::
if [ ! -d $(LIBDIR) ]; \
then \
mkdir -p $(LIBDIR); \
true; \
else \
true; \
fi
ui-local.c :: ui.c
rm -f ui-local.c
ln ui.c ui-local.c
DependTarget()